package com.etc.cloud.contrller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.cloud.stream.messaging.Sink;
import org.springframework.messaging.Message;
import org.springframework.stereotype.Component;

/**
 * @Author kalista
 * @Description
 * @Date 2020/8/25  16:39
 **/
@Slf4j
@Component
@EnableBinding(Sink.class)
public class ReceiveMessageListener {


    @StreamListener(Sink.INPUT)
    public void input(Message<String> message){
        String payload = message.getPayload();
        log.info("消费者 接受信息------->" + payload);
    }



}
